home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
cu.z
/
cu
Wrap
Text File
|
1998-10-20
|
16KB
|
397 lines
CCCCUUUU((((1111CCCC)))) CCCCUUUU((((1111CCCC))))
NNNNAAAAMMMMEEEE
cu - call another UNIX system
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ccccuuuu [_o_p_t_i_o_n_s] [----ssss speed] ----llll line
ccccuuuu [_o_p_t_i_o_n_s] [----ssss speed] [----llll line] [----nnnn] telno
ccccuuuu [_o_p_t_i_o_n_s] systemname
where _o_p_t_i_o_n_s can be any of:
[----hhhh] [----dddd] [----oooo | ----eeee] [----cccc ccccllllaaaassssssss]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_c_u calls up another UNIX system, a terminal, or possibly a non-UNIX
system. It manages an interactive conversation with possible transfers
of ASCII files.
_c_u accepts the following options and arguments:
----ssss_s_p_e_e_d Specifies the transmission speed (300, 1200, 2400, 4800,
9600); The default value is "Any" speed which will depend on
the order of the lines in the ////eeeettttcccc////uuuuuuuuccccpppp////DDDDeeeevvvviiiicccceeeessss file.
----llll_l_i_n_e Specifies a device name to use as the communication line.
This can be used to override the search that would otherwise
take place for the first available line having the right
speed. When the ----llll option is used without the ----ssss option, the
speed of a line is taken from the Devices file. When the ----llll
and ----ssss options are both used together, cu will search the
Devices file to check if the requested speed for the
requested line is available. If so, the connection will be
made at the requested speed; otherwise an error message will
be printed and the call will not be made. If the device is
not found in the Devices file, an error message similar to
_NNNN_OOOO _DDDD_EEEE_VVVV_IIII_CCCC_EEEE_SSSS _AAAA_VVVV_AAAA_IIII_LLLL_AAAA_BBBB_LLLL_EEEE
is printed. The specified device is generally a directly
connected asynchronous line (e.g., ////ddddeeeevvvv////ttttttttyyyydddd4444) in which case
a telephone number (_t_e_l_n_o) is not required. The specified
device need not be in the ////ddddeeeevvvv directory. If the specified
device is associated with an auto dialer, a telephone number
must be provided.
A line also used by _g_e_t_t_y(1M) cannot be used with this
option. A line in use by _u_u_g_e_t_t_y(1M) can be used, provided
the same physical device name is used by both cu and uugetty.
However, if _u_u_g_e_t_t_y(1M) is being used, there is likely to be
an autodialing modem on the line, using an entry in the
Dialers file like the HHHHaaaayyyyeeeessss22224444 entry, and ready to accept a
telephone, _t_e_l_n_o, number from the _c_u command.
Use of this option with _s_y_s_t_e_m_n_a_m_e rather than _t_e_l_n_o will not
PPPPaaaaggggeeee 1111
CCCCUUUU((((1111CCCC)))) CCCCUUUU((((1111CCCC))))
give the desired result (see _s_y_s_t_e_m_n_a_m_e below).
----hhhh Emulates local echo, supporting calls to other computer
systems which expect terminals to be set to half-duplex mode.
----tttt Used to dial an ASCII terminal which has been set to auto
answer. Appropriate mapping of carriage-return to carriage-
return-line-feed pairs is set.
----dddd Causes diagnostic traces to be printed.
----oooo Designates that odd parity is to be generated for data sent
to the remote system.
----nnnn For added security, will prompt the user to provide the
telephone number to be dialed rather than taking it from the
command line.
----eeee Designates that even parity is to be generated for data sent
to the remote system.
----cccc_c_l_a_s_s Specifies a modem "class" such as _A_C_U or _D_i_r_e_c_t found in the
Dialers file.
_t_e_l_n_o When using an automatic dialer, the argument is the telephone
number with equal signs for secondary dial tone or minus
signs placed appropriately for delays of 4 seconds.
_s_y_s_t_e_m_n_a_m_e A uucp system name may be used rather than a telephone
number; in this case, _c_u will obtain an appropriate direct
line or telephone number from ////eeeettttcccc////uuuuuuuuccccpppp////SSSSyyyysssstttteeeemmmmssss.... Note that
the _s_y_s_t_e_m_n_a_m_e option should not be used in conjunction with
the ----llll and ----ssss options as _c_u will connect to the first
available line for the system name specified, ignoring the
requested line and speed. Note that only the telephone
number will be used from the ////eeeettttcccc////uuuuuuuuccccpppp////SSSSyyyysssstttteeeemmmmssss file; the
chatting to log into the remote system will not be used since
it is unlikely that an interactive user wants to start SLIP,
PPP, or UUCP.
After making the connection, _c_u runs as two processes: the _t_r_a_n_s_m_i_t
process reads data from the standard input and, except for lines
beginning with ~~~~, passes it to the remote system; the _r_e_c_e_i_v_e process
accepts data from the remote system and, except for lines beginning with
~~~~, passes it to the standard output. Normally, an automatic DC3/DC1
protocol is used to control input from the remote so the buffer is not
overrun. Lines beginning with ~~~~ have special meanings.
The _t_r_a_n_s_m_i_t process interprets the following user initiated commands:
PPPPaaaaggggeeee 2222
CCCCUUUU((((1111CCCC)))) CCCCUUUU((((1111CCCC))))
~~~~.... terminate the conversation.
~~~~!!!! escape to an interactive shell on the local system.
~~~~!!!!_c_m_d... run _c_m_d on the local system (via sssshhhh ----cccc).
~~~~$$$$_c_m_d... run _c_m_d locally and send its output to the remote
system.
~~~~^^^^ZZZZ suspend the _c_u session. (^Z, control-Z, is the
current job control suspend character (see _c_s_h(1) and
_s_t_t_y(1)).
~~~~%%%%ccccdddd change the directory on the local system. Note:
~~~~!!!!ccccdddd will cause the command to be run by a sub-shell,
probably not what was intended.
~~~~%%%%ttttaaaakkkkeeee _f_r_o_m [ _t_o ] copy file _f_r_o_m (on the remote system) to file _t_o on
the local system. If _t_o is omitted, the _f_r_o_m
argument is used in both places. The shell commands
below are sent to the remote machine to cause it to
transmit the file. In fact, they are sent in a
single line with semicolons (;) between each command.
stty -echo
if test -r arg1; then
(echo '~>':arg2;cat arg1;echo '~>')
else
echo cant\'t open: arg1
fi
stty echo
~~~~%%%%ppppuuuutttt _f_r_o_m [ _t_o ]
copy file _f_r_o_m (on local system) to file _t_o on remote system. If _t_o
is omitted, the _f_r_o_m argument is used in both places.
For both ~~~~%%%%ttttaaaakkkkeeee and ppppuuuutttt commands, as each block of the file is
transferred, consecutive single digits are printed to the terminal.
The shell command line below is sent to the remote machine to cause
it to accept the data. Obviously, the shell on the remote machine
must be /bin/sh or a shell that correctly interpret these commands.
stty -echo;(cat - > arg2)||cat - >/dev/null;stty echo
~~~~~~~~ _l_i_n_e
send the line ~~~~ _l_i_n_e to the remote system.
PPPPaaaaggggeeee 3333
CCCCUUUU((((1111CCCC)))) CCCCUUUU((((1111CCCC))))
~~~~%%%%bbbbrrrreeeeaaaakkkk
transmit a BBBBRRRREEEEAAAAKKKK to the remote system (which can also be specified
as ~~~~%%%%bbbb).
~~~~%%%%ddddeeeebbbbuuuugggg
toggles the ----dddd debugging option on or off (which can also be
specified as ~~~~%%%%dddd).
~~~~tttt prints the values of the termio structure variables for the user's
terminal (useful for debugging).
~~~~llll prints the values of the termio structure variables for the remote
communication line (useful for debugging).
~~~~%%%%nnnnoooossssttttoooopppp
toggles between DC3/DC1 input control protocol and no input control.
This is useful in case the remote system is one which does not
respond properly to the DC3 and DC1 characters.
The _r_e_c_e_i_v_e process normally copies data from the remote system to its
standard output. The program accomplishes the ~~~~%%%%ttttaaaakkkkeeee command by
initiating an output diversion to a file when a line from the remote
begins with ~~~~.
Data from the remote is diverted (or appended, if >>>>>>>> is used) to _f_i_l_e on
the local system. The trailing ~~~~>>>> marks the end of the diversion.
The use of ~~~~%%%%ppppuuuutttt requires _s_t_t_y(1) and _c_a_t(1) on the remote side. It also
requires that the current erase and kill characters on the remote system
be identical to these current control characters on the local system.
Backslashes are inserted at appropriate places.
The use of ~~~~%%%%ttttaaaakkkkeeee requires the existence of _e_c_h_o(1) and _c_a_t(1) on the
remote system. Also, _t_a_b_s mode (See _s_t_t_y(_1)) should be set on the remote
system if tabs are to be copied without expansion to spaces.
When _c_u is used on system X to connect to system Y and subsequently used
on system Y to connect to system Z, commands on system Y can be executed
by using ~~. Executing a tilde command reminds the user of the local
system uname. For example, uname can be executed on Z, X, and Y as
follows:
uname
Z
~[X]!uname
X
~~[Y]!uname
Y
In general, ~~~~ causes the command to be executed on the original machine,
~~~~~~~~ causes the command to be executed on the next machine in the chain.
PPPPaaaaggggeeee 4444
CCCCUUUU((((1111CCCC)))) CCCCUUUU((((1111CCCC))))
EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
To dial a system whose telephone number is 9 201 555 1212 using 1200 baud
(where dialtone is expected after the 9):
cu -s1200 9=12015551212
If the speed is not specified, "Any" is the default value.
To login to a system connected by a direct line:
cu -l /dev/ttyXX
or
cu -l ttyXX
To dial a system with the specific line and a specific speed:
cu -s1200 -l ttyXX
To dial a system using a specific line associated with an auto dialer:
cu -l culXX 9=12015551212
To use a system name:
cu systemname
FFFFIIIILLLLEEEESSSS
/etc/uucp/Systems
/etc/uucp/Devices
/var/spool/locks/LCK..(tty-device)
/dev/tty*
SSSSEEEEEEEE AAAALLLLSSSSOOOO
cat(1), duart(7), echo(1), stty(1), uucp(1C), uugetty(1M), uname(1).
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
Exit code is zero for normal exit, otherwise, one.
WWWWAAAARRRRNNNNIIIINNNNGGGGSSSS
The _c_u command does not do any integrity checking on data it transfers.
Data fields with special _c_u characters may not be transmitted properly.
Depending on the interconnection hardware, it may be necessary to use a
~~~~.... to terminate the conversion even if ssssttttttttyyyy 0000 has been used. Non-
printing characters are not dependably transmitted using either the ~~~~%%%%ppppuuuutttt
or ~~~~%%%%ttttaaaakkkkeeee commands. _c_u between an IMBR1 and a penril modem will not
return a login prompt immediately upon connection. A carriage return
will return the prompt.
The device names, dialers, and so forth in /_e_t_c/_u_u_c_p/_D_e_v_i_c_e_s must be
correct. Because _c_u is suid-uucp, the device used, such as /_d_e_v/_t_t_y_m_3,
must be readable and writable by the "user" uucp.
BBBBUUUUGGGGSSSS
There is an artificial slowing of transmission by _c_u during the ~~~~%%%%ppppuuuutttt
operation so that loss of data is unlikely.
PPPPaaaaggggeeee 5555
CCCCUUUU((((1111CCCC)))) CCCCUUUU((((1111CCCC))))
PPPPaaaaggggeeee 6666